<?php

Loader::loadClass('InnoUtil', "modules/SpaService/pnincludes");
Loader::loadClass('SpaUtil', "modules/SpaService/pnincludes");

function SpaService_pntables()
{
    // Initialise table array
    $pntable = array();
    $pntable     = createFirstGroupTable();

    return $pntable;
}

function &createFirstGroupTable()
{
    ////////////////////////////////////////////
    //table definition ReceptionAccount
    ////////////////////////////////////////////
    $pntable['spaservice_receptionaccount'] = DBUtil::getLimitedTablename('spaservice_receptionaccount');
    $pntable['spaservice_receptionaccount_column'] = array(
                                        'id'                => 'rea_id',
                                        'isActive'          => 'rea_isactive',
                                        'password'          => 'rea_password',
                                        'username'          => 'rea_username'
    );
    $pntable['spaservice_receptionaccount_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'isActive'          => 'VARCHAR(255)',
                                        'password'          => 'VARCHAR(255)',
                                        'username'          => 'VARCHAR(255)'
    );
    $pntable['spaservice_receptionaccount_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_receptionaccount_column'], 'rea_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_receptionaccount_column_def']);
    
    ////////////////////////////////////////////
    //table definition ReceptionInfo
    ////////////////////////////////////////////
    $pntable['spaservice_receptioninfo'] = DBUtil::getLimitedTablename('spaservice_receptioninfo');
    $pntable['spaservice_receptioninfo_column'] = array(
                                        'address'              => 'rei_adress',
                                        'birthday'             => 'rei_birthday',
                                        'bloodGroup'           => 'rei_bloodgroup',
                                        'city'                 => 'rei_city',
                                        'country'              => 'rei_country',
                                        'email'                => 'rei_email',
                                        'firstName'            => 'rei_firstname',
                                        'gender'               => 'rei_gender',
                                        'id'                   => 'rei_id',
                                        'lastName'             => 'rei_lastname',
                                        'mobilePhone'          => 'rei_mobilephone',
                                        'nickname'             => 'rei_nickname',
                                        'picture'              => 'rei_picture',
                                        'post'                 => 'rei_post',
                                        'specialDetail'        => 'rei_specialDetail',
                                        'state'                => 'rei_state',
                                        'telephone'            => 'rei_telephone',
                                        'receptionAccount_id'  => 'rei_receptionaccount_id'
    );
    $pntable['spaservice_receptioninfo_column_def'] = array(
                                        'address'              => 'VARCHAR(255)',
                                        'birthday'             => 'TIMESTAMP NOTNULL',
                                        'bloodGroup'           => 'VARCHAR(255)',
                                        'city'                 => 'VARCHAR(255)',
                                        'country'              => 'VARCHAR(255)',
                                        'email'                => 'VARCHAR(255)',
                                        'firstName'            => 'VARCHAR(255)',
                                        'gender'               => 'VARCHAR(255)',
                                        'id'                   => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'lastName'             => 'VARCHAR(255)',
                                        'mobilePhone'          => 'VARCHAR(255)',
                                        'nickname'             => 'VARCHAR(255)',
                                        'picture'              => 'VARCHAR(255)',
                                        'post'                 => 'VARCHAR(255)',
                                        'specialDetail'        => 'VARCHAR(255)',
                                        'state'                => 'VARCHAR(255)',
                                        'telephone'            => 'VARCHAR(255)',
                                        'receptionAccount_id'  => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_receptioninfo_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_receptioninfo_column'], 'rei_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_receptioninfo_column_def']);
	
    ////////////////////////////////////////////
    //table definition AgencyGroup
    ////////////////////////////////////////////
    $pntable['spaservice_agencygroup'] = DBUtil::getLimitedTablename('spaservice_agencygroup');
    $pntable['spaservice_agencygroup_column'] = array(
                                        'id'                => 'agg_id',
                                        'title'             => 'agg_title',
                                        'titleTranslate'    => 'agg_titletranslate'
    );
    $pntable['spaservice_agencygroup_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',   
                                        'title'             => 'VARCHAR(255)',
                                        'titleTranslate'    => 'VARCHAR(255)'
    );
    $pntable['spaservice_agencygroup_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_agencygroup_column'], 'agg_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_agencygroup_column_def']);
    
    ////////////////////////////////////////////
    //table definition Agency
    ////////////////////////////////////////////
    $pntable['spaservice_agency'] = DBUtil::getLimitedTablename('spaservice_agency');
    $pntable['spaservice_agency_column'] = array(
                                        'address'          => 'age_address',
                                        'city'             => 'age_city',
                                        'companyName'      => 'age_companyname',
                                        'country'          => 'age_country',
                                        'email'            => 'age_email',
                                        'fax'              => 'age_fax',
                                        'id'               => 'age_id',
                                        'isActive'         => 'age_isactive',
                                        'licenseNumber'    => 'age_licensenumber',
                                        'picture'          => 'age_picture',
                                        'post'             => 'age_post',
                                        'specialDetail'    => 'age_specialdetail',
                                        'state'            => 'age_state',
                                        'telephone'        => 'age_telephone',
                                        'website'          => 'age_website',
                                        'agencyGroup_id'   => 'age_agencygroup_id'
    );
    $pntable['spaservice_agency_column_def'] = array(
                                        'address'          => 'VARCHAR(255)',
                                        'city'             => 'VARCHAR(255)',
                                        'companyName'      => 'VARCHAR(255)',
                                        'country'          => 'VARCHAR(255)',
                                        'email'            => 'VARCHAR(255)',
                                        'fax'              => 'VARCHAR(255)',
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'isActive'         => 'INT(11)',
                                        'licenseNumber'    => 'VARCHAR(255)',
                                        'picture'          => 'VARCHAR(255)',
                                        'post'             => 'VARCHAR(255)',
                                        'specialDetail'    => 'VARCHAR(255)',
                                        'state'            => 'VARCHAR(255)',
                                        'telephone'        => 'VARCHAR(255)',
                                        'website'          => 'VARCHAR(255)',
                                        'agencyGroup_id'   => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_agency_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_agency_column'], 'age_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_agency_column_def']);
	////////////////////////////////////////////
    //table definition AgencyCustomer
    ////////////////////////////////////////////
    $pntable['spaservice_agencycustomer'] = DBUtil::getLimitedTablename('spaservice_agencycustomer');
    $pntable['spaservice_agencycustomer_column'] = array(
                                        'address'          => 'agc_address',
                                        'birthday'         => 'agc_birthday',
                                        'bloodGroup'       => 'agc_bloodgroup',
                                        'city'             => 'agc_city',
                                        'country'          => 'agc_country',
                                        'email'            => 'agc_email',
                                        'firstName'        => 'agc_firstname',
                                        'gender'           => 'agc_gender',
                                        'id'               => 'agc_id',
                                        'isActive'         => 'agc_isactive',
                                        'lastName'         => 'agc_lastname',
                                        'mobilePhone'      => 'agc_mobilephone',
                                        'nickname'         => 'agc_nickname',
                                        'picture'          => 'agc_picture',
                                        'post'             => 'agc_post',
                                        'specialDetail'    => 'agc_specialdetail',
                                        'state'            => 'agc_state',
                                        'talephone'        => 'agc_telephone',
                                        'agency_id'        => 'agc_agency_id',
                                        'customerService_id'  => 'agc_customerservice_id'
    );
    $pntable['spaservice_agencycustomer_column_def'] = array(
                                        'address'          => 'VARCHAR(255)',
                                        'birthday'         => 'TIMESTAMP NOTNULL',
                                        'bloodGroup'       => 'VARCHAR(255)',
                                        'city'             => 'VARCHAR(255)',
                                        'country'          => 'VARCHAR(255)',
                                        'email'            => 'VARCHAR(255)',
                                        'firstName'        => 'VARCHAR(255)',
                                        'gender'           => 'VARCHAR(255)',
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'isActive'         => 'INT(11)',
                                        'lastName'         => 'VARCHAR(255)',
                                        'mobilePhone'      => 'VARCHAR(255)',
                                        'nickName'         => 'VARCHAR(255)',
                                        'picture'          => 'VARCHAR(255)',
                                        'post'             => 'VARCHAR(255)',
                                        'specialDetail'    => 'VARCHAR(255)',
                                        'state'            => 'VARCHAR(255)',
                                        'talephone'        => 'VARCHAR(255)',
                                        'agency_id'        => 'INT(11) NOTNULL',
                                        'customerService_id'  => 'INT(11) NOTNULL'	
    );
    $pntable['spaservice_agencycustomer_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_agencycustomer_column'], 'agc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_agencycustomer_column_def']); 
	////////////////////////////////////////////
    //table definition CustomerGroup
    ////////////////////////////////////////////
    $pntable['spaservice_customergroup'] = DBUtil::getLimitedTablename('spaservice_customergroup');
    $pntable['spaservice_customergroup_column'] = array(
                                                        'id'               => 'cug_id',                            
                                                        'title'            => 'cug_title',
                                                        'titleTranslate'   => 'cug_titletranslate'			
    );
    $pntable['spaservice_customergroup_column_def'] = array(                                   
                                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
                                                        'title'            => 'VARCHAR(255)',
                                                        'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_customergroup_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customergroup_column'], 'cug_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customergroup_column_def']);
	////////////////////////////////////////////
    //table definition Customer
    ////////////////////////////////////////////
    $pntable['spaservice_customer'] = DBUtil::getLimitedTablename('spaservice_customer');
    $pntable['spaservice_customer_column'] = array(
                                        'address'            => 'cus_address',
                                        'birthday'           => 'cus_birthday',
                                        'bloodGroup'         => 'cus_bloodgroup',
                                        'city'               => 'cus_city',
                                        'country'            => 'cus_country',
                                        'email'              => 'cus_email',
                                        'firstName'          => 'cus_firstname',
                                        'gender'             => 'cus_gender',
                                        'id'                 => 'cus_id',
                                        'isActive'           => 'cus_isactive',
                                        'lastName'           => 'cus_lastname',
                                        'mobilePhone'        => 'cus_mobilephone',
                                        'nickname'           => 'cus_nickname',
                                        'picture'            => 'cus_picture',
                                        'post'               => 'cus_post',
                                        'specialDetail'      => 'cus_specialdetail',
                                        'state'              => 'cus_state',
                                        'telephone'          => 'cus_telephone',
                                        'customerGroup_id'   => 'cus_customergroup_id',
                                        'customerService_id' => 'cus_customerService_id'
    );
    $pntable['spaservice_customer_column_def'] = array(
                                        'address'            => 'VARCHAR(255)',
                                        'birthday'           => 'TIMESTAMP NOTNULL',
                                        'bloodGroup'         => 'VARCHAR(255)',
                                        'city'               => 'VARCHAR(255)',
                                        'country'            => 'VARCHAR(255)',
                                        'email'              => 'VARCHAR(255)',
                                        'firstName'          => 'VARCHAR(255)',
                                        'gender'             => 'VARCHAR(255)',
                                        'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'isActive'           => 'INT(11)',
                                        'lastName'           => 'VARCHAR(255)',
                                        'mobilePhone'        => 'VARCHAR(255)',
                                        'nickname'           => 'VARCHAR(255)',
                                        'picture'            => 'VARCHAR(255)',
                                        'post'               => 'VARCHAR(255)',
                                        'specialDetail'      => 'VARCHAR(255)',
                                        'state'              => 'VARCHAR(255)',
                                        'telephone'          => 'VARCHAR(255)',
                                        'customerGroup_id'   => 'INT(11) NOTNULL',
                                        'customerService_id' => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_customer_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customer_column'], 'cus_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customer_column_def']);
    
    ////////////////////////////////////////////
    //table definition PresentHistory
    ////////////////////////////////////////////
    $pntable['spaservice_presenthistory'] = DBUtil::getLimitedTablename('spaservice_presenthistory');
    $pntable['spaservice_presenthistory_column'] = array(
                                        'id'               => 'prh_id',                            
                                        'title'            => 'prh_title',
                                        'titleTranslate'   => 'prh_titletranslate'
    );
    $pntable['spaservice_presenthistory_column_def'] = array(                                   
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',   
                                        'title'            => 'VARCHAR(255)',
                                        'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_presenthistory_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_presenthistory_column'], 'prh_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_presenthistory_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpecialCare
    ////////////////////////////////////////////
    $pntable['spaservice_specialcare'] = DBUtil::getLimitedTablename('spaservice_specialcare');
    $pntable['spaservice_specialcare_column'] = array(
                                        'id'               => 'spc_id',                            
                                        'title'            => 'spc_title',
                                        'titleTranslate'   => 'spc_titletranslate'
    );
    $pntable['spaservice_specialcare_column_def'] = array(                                   
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
                                        'title'            => 'VARCHAR(255)',
                                        'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_specialcare_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_specialcare_column'], 'spc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_specialcare_column_def']);
    
    ////////////////////////////////////////////
    //table definition ContactPerson
    ////////////////////////////////////////////
    $pntable['spaservice_contactperson'] = DBUtil::getLimitedTablename('spaservice_contactperson');
    $pntable['spaservice_contactperson_column'] = array(
                                  'email'            => 'cop_email',
                                  'firstName'        => 'cop_firstname',
                                  'id'               => 'cop_id',
                                  'isMainContact'    => 'cop_ismaincontact',
                                  'lastName'         => 'cop_lastname',
                                  'mobilePhone'      => 'cop_mobilephone',
                                  'nickname'         => 'cop_nickname',
                                  'position'         => 'cop_position',
                                  'telephone'        => 'cop_telephone',
                                  'agency_id'        => 'cop_agency_id'
    );
    $pntable['spaservice_contactperson_column_def'] = array(                                   
                                  'email'            => 'VARCHAR(255)',	                 
                                  'firstName'        => 'VARCHAR(255)',	
                                  'id'               => 'INT(11) AUTOINCREMENT PRIMARY',
                                  'isMainContact'    => 'INT(11)',
                                  'lastName'         => 'VARCHAR(255)',	
                                  'mobilePhone'      => 'VARCHAR(255)',
                                  'nickname'         => 'VARCHAR(255)',	
                                  'position'         => 'VARCHAR(255)',	
                                  'telephone'        => 'VARCHAR(255)',	
                                  'agency_id'        => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_contactperson_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_contactperson_column'], 'cop_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_contactperson_column_def']);
    
    ////////////////////////////////////////////
    //table definition CustomerService
    ////////////////////////////////////////////
    $pntable['spaservice_customerservice'] = DBUtil::getLimitedTablename('spaservice_customerservice');
    $pntable['spaservice_customerservice_column'] = array(
										'id'                  => 'cse_id',                         
										'agencyCustomer_id'   => 'cse_agencycustomer_id',
										'customer_id'         => 'cse_customer_id',
										'customercomments_id' => 'cse_customercomments_id',
										'massagePressure_id'  => 'cse_massagepressure_id',
										'presentHistories_id' => 'cse_presenthistories_id',
										'specialCares_id'     => 'cse_specialcares_id'
    );
    $pntable['spaservice_customerservice_column_def'] = array(                                   
                                        'id'                  => 'INT(11) AUTOINCREMENT PRIMARY',  
										'agencyCustomer_id'   => 'INT(11) NOTNULL',
										'customer_id'         => 'INT(11) NOTNULL',
										'customercomments_id' => 'INT(11) NOTNULL',
										'massagePressure_id'  => 'INT(11) NOTNULL',
										'presentHistories_id' => 'INT(11) NOTNULL',
										'specialCares_id'     => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_customerservice_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customerservice_column'], 'cse_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customerservice_column_def']);
    
    ////////////////////////////////////////////
    //table definition CustomerService_PresentHistory
    ////////////////////////////////////////////
    $pntable['spaservice_customerservice_presenthistory'] = DBUtil::getLimitedTablename('spaservice_customerservice_presenthistory');
    $pntable['spaservice_customerservice_presenthistory_column'] = array(
										'id'                 => 'csph_id',                         
										'presentHistory_id'  => 'csph_presenthistory_id',
										'customerService_id' => 'csph_customerservice_id'	
    );
    $pntable['spaservice_customerservice_presenthistory_column_def'] = array(                      
                                        'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'presentHistory_id'  => 'INT(11) NOTNULL',
                                        'customerService_id' => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_customerservice_presenthistory_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customerservice_presenthistory_column'], 'csph_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customerservice_presenthistory_column_def']);
    
    ////////////////////////////////////////////
    //table definition CustomerService_SpecialCare
    ////////////////////////////////////////////
    $pntable['spaservice_customerservice_specialcare'] = DBUtil::getLimitedTablename('spaservice_customerservice_specialcare');
    $pntable['spaservice_customerservice_specialcare_column'] = array(
										'id'                 => 'cssc_id',                         
										'specialCare_id'     => 'cssc_specialcare_id',
										'customerService_id' => 'cssc_customerservice_id'	
    );
    $pntable['spaservice_customerservice_specialcare_column_def'] = array(                      
                                        'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'specialCare_id'     => 'INT(11) NOTNULL',
                                        'customerService_id' => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_customerservice_specialcare_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customerservice_specialcare_column'], 'cssc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customerservice_specialcare_column_def']);
    
    ////////////////////////////////////////////
    //table definition MassagePressure
    ////////////////////////////////////////////
    $pntable['spaservice_massagepressure'] = DBUtil::getLimitedTablename('spaservice_massagepressure');
    $pntable['spaservice_massagepressure_column'] = array(
										'id'               => 'map_id',                            
										'title'            => 'map_title',
										'titleTranslate'   => 'map_titletranslate'			
    );
    $pntable['spaservice_massagepressure_column_def'] = array(                                   
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',      
										'title'            => 'VARCHAR(255)',
										'titleTranslate'   => 'VARCHAR(255)'				
    );
    $pntable['spaservice_massagepressure_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_massagepressure_column'], 'map_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_massagepressure_column_def']);
    
    ////////////////////////////////////////////
    //table definition CustomerComment
    ////////////////////////////////////////////
    $pntable['spaservice_customercomment'] = DBUtil::getLimitedTablename('spaservice_customercomment');
    $pntable['spaservice_customercomment_column'] = array(
										'id'                 => 'cuc_id',                          
										'didYouKnow'         => 'cuc_didyouknow',
										'overAllComments'    => 'cuc_overallcomments',
										'willComeBack'       => 'cuc_willcomeback',
										'customerService_id' => 'cuc_customerservice_id'
    );
    $pntable['spaservice_customercomment_column_def'] = array(                                   
                                        'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',   
										'didYouKnow'         => 'VARCHAR(255)',
										'overAllComments'    => 'VARCHAR(255)',
										'willComeBack'       => 'INT(11)',
										'customerService_id' => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_customercomment_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_customercomment_column'], 'cuc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_customercomment_column_def']);
    
    ////////////////////////////////////////////
    //table definition ServiceComment
    ////////////////////////////////////////////
    $pntable['spaservice_servicecomment'] = DBUtil::getLimitedTablename('spaservice_servicecomment');
    $pntable['spaservice_servicecomment_column'] = array(
										'id'                  => 'sec_id',
										'score'               => 'sec_score',            
										'commentList_id'      => 'sec_commentlist_id',
										'customerComment_id'  => 'sec_customercomment_id'		
    );
    $pntable['spaservice_servicecomment_column_def'] = array(
                                        'id'                  => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'score'               => 'INT(11)',
                                        'commentList_id'      => 'INT(11) NOTNULL',
                                        'customerComment_id'  => 'INT(11) NOTNULL'				
    );
    $pntable['spaservice_servicecomment_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_servicecomment_column'], 'sec_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_servicecomment_column_def']);
    ////////////////////////////////////////////
    //table definition CommentList
    ////////////////////////////////////////////
    $pntable['spaservice_commentlist'] = DBUtil::getLimitedTablename('spaservice_commentlist');
    $pntable['spaservice_commentlist_column'] = array(
										'id'               => 'col_id',                            
										'title'            => 'col_title',
										'titleTranslate'   => 'col_titletranslate'			
    );
    $pntable['spaservice_commentlist_column_def'] = array(                                   
                                        'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
										'title'            => 'VARCHAR(255)',
										'titleTranslate'   => 'VARCHAR(255)'				
    );
    $pntable['spaservice_commentlist_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_commentlist_column'], 'col_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_commentlist_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaService
    ////////////////////////////////////////////
    $pntable['spaservice_spaservice'] = DBUtil::getLimitedTablename('spaservice_spaservice');
    $pntable['spaservice_spaservice_column'] = array(
										'id'                 => 'sps_id',
										'isAutoTimeSet'      => 'sps_isautotimeset',               
										'isPackage'          => 'sps_ispackage',
										'timeEnd'            => 'sps_timeend',
										'timeMins'           => 'sps_timemins',
										'timeStamp'          => 'sps_timestamp',
										'timeStart'          => 'sps_timestart',
										'customerService_id' => 'sps_customerservice_id',
										'spaCategory_id'     => 'sps_spacategory_id',
										'spaMenu_id'         => 'sps_spamenu_id',
										'spaMenuTime_id'     => 'sps_spamenutime_id',
										'spaOil_id'          => 'sps_spaoil_id',
										'spaPackage_id'      => 'sps_spapackage_id',
										'spaRoom_id'         => 'sps_sparoom_id'			
    );
    $pntable['spaservice_spaservice_column_def'] = array(   
										'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',   
										'isAutoTimeSet'      => 'INT(11)',               
										'isPackage'          => 'INT(11)',
										'timeEnd'            => 'TIMESTAMP NOTNULL',
										'timeMins'           => 'INT(11)',
										'timeStamp'          => 'TIMESTAMP NOTNULL',
										'timeStart'          => 'TIMESTAMP NOTNULL',
										'customerService_id' => 'INT(11) NOTNULL',
										'spaCategory_id'     => 'INT(11) NOTNULL',
										'spaMenu_id'         => 'INT(11) NOTNULL',
										'spaMenuTime_id'     => 'INT(11) NOTNULL',
										'spaOil_id'          => 'INT(11) NOTNULL',
										'spaPackage_id'      => 'INT(11) NOTNULL',
										'spaRoom_id'         => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spaservice_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaservice_column'], 'sps_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaservice_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaPackage
    ////////////////////////////////////////////
    $pntable['spaservice_spapackage'] = DBUtil::getLimitedTablename('spaservice_spapackage');
    $pntable['spaservice_spapackage_column'] = array(
                    'id'               => 'spp_id',                            
                    'title'            => 'spp_title',
                    'titleTranslate'   => 'spp_titletranslate'			
    );
    $pntable['spaservice_spapackage_column_def'] = array(                                   
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',
                    'title'            => 'VARCHAR(255)',
                    'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_spapackage_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spapackage_column'], 'spp_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spapackage_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaPackageTime
    ////////////////////////////////////////////
    $pntable['spaservice_spapackagetime'] = DBUtil::getLimitedTablename('spaservice_spapackagetime');
    $pntable['spaservice_spapackagetime_column'] = array(
										'id'               => 'spt_id',                            
										'price'            => 'spt_price',
										'timeMins'         => 'spt_timemins',
										'spaPackage_id'    => 'spt_spapackage_id'
    );
    $pntable['spaservice_spapackagetime_column_def'] = array(                                   
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
										'price'            => 'FLOAT(11)',
										'timeMins'         => 'INT(11)',
										'spaPackage_id'    => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spapackagetime_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spapackagetime_column'], 'spt_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spapackagetime_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaMenuTime
    ////////////////////////////////////////////
    $pntable['spaservice_spamenutime'] = DBUtil::getLimitedTablename('spaservice_spamenutime');
    $pntable['spaservice_spamenutime_column'] = array(
										'id'               => 'smt_id',                            
										'price'            => 'smt_price',
										'timeMins'         => 'smt_timemins',
										'spaMenu_id'       => 'smt_spamenu_id'
    );
    $pntable['spaservice_spamenutime_column_def'] = array(                                   
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',      
                    'price'            => 'VARCHAR(255)',
                    'timeMins'         => 'INT(11)',
                    'spaMenu_id'       => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spamenutime_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spamenutime_column'], 'smt_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spamenutime_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaOil
    ////////////////////////////////////////////
    $pntable['spaservice_spaoil'] = DBUtil::getLimitedTablename('spaservice_spaoil');
    $pntable['spaservice_spaoil_column'] = array(
                    'id'               => 'spo_id',                            
                    'title'            => 'spo_title',
                    'titleTranslate'   => 'spo_titletranslate'
    );
    $pntable['spaservice_spaoil_column_def'] = array(                                   
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
                    'title'            => 'VARCHAR(255)',
                    'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_spaoil_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaoil_column'], 'spo_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaoil_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaServiceHistory
    ////////////////////////////////////////////
    $pntable['spaservice_spaservicehistory'] = DBUtil::getLimitedTablename('spaservice_spaservicehistory');
    $pntable['spaservice_spaservicehistory_column'] = array(
										'id'                 => 'ssh_id',
										'timeStamp'          => 'ssh_timestamp',                  
										'customerService_id' => 'ssh_customerservice_id',
										'spaCategory_id'     => 'ssh_spacategory_id',
										'spaMenu_id'         => 'ssh_spamenu_id',
										'spaMenuTime_id'     => 'ssh_spamenutime_id',
										'spaOil_id'          => 'ssh_spaoil_id',
										'spaRoom_id'         => 'ssh_sparoom_id'			
    );
    $pntable['spaservice_spaservicehistory_column_def'] = array(
										'id'                 => 'INT(11) AUTOINCREMENT PRIMARY',   
										'timeStamp'          => 'TIMESTAMP NOTNULL',               
										'customerService_id' => 'INT(11) NOTNULL',
										'spaCategory_id'     => 'INT(11) NOTNULL',
										'spaMenu_id'         => 'INT(11) NOTNULL',
										'spaMenuTime_id'     => 'INT(11) NOTNULL',
										'spaOil_id'          => 'INT(11) NOTNULL',
										'spaRoom_id'         => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spaservicehistory_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaservicehistory_column'], 'ssh_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaservicehistory_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaRoom
    ////////////////////////////////////////////
    $pntable['spaservice_sparoom'] = DBUtil::getLimitedTablename('spaservice_sparoom');
    $pntable['spaservice_sparoom_column'] = array(
										'id'               => 'spr_id',                            
										'title'            => 'spr_title',
										'titleTranslate'   => 'spr_titletranslate'			
    );
    $pntable['spaservice_sparoom_column_def'] = array(                                   
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',    
										'title'            => 'VARCHAR(255)',
										'titleTranslate'   => 'VARCHAR(255)'
    );
    $pntable['spaservice_sparoom_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_sparoom_column'], 'spr_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_sparoom_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaEmployee
    ////////////////////////////////////////////
    $pntable['spaservice_spaemployee'] = DBUtil::getLimitedTablename('spaservice_spaemployee');
    $pntable['spaservice_spaemployee_column'] = array(
                                        'address'              => 'spe_adress',
                                        'birthday'             => 'spe_birthday',
                                        'bloodGroup'           => 'spe_bloodgroup',
                                        'city'                 => 'spe_city',
                                        'country'              => 'spe_country',
                                        'email'                => 'spe_email',
                                        'firstName'            => 'spe_firstname',
                                        'gender'               => 'spe_gender',
                                        'id'                   => 'spe_id',
                                        'lastName'             => 'spe_lastname',
                                        'mobilePhone'          => 'spe_mobilephone',
                                        'nickname'             => 'spe_nickname',
                                        'picture'              => 'spe_picture',
                                        'post'                 => 'spe_post',
                                        'specialDetail'        => 'spe_specialdetail',
                                        'state'                => 'spe_state',
                                        'telephone'            => 'spe_telephone',
                                        'spaEmployeeQueue_id'  => 'spe_spaemployeequeue_id'
    );
    $pntable['spaservice_spaemployee_column_def'] = array(
                                        'address'              => 'VARCHAR(255)',
                                        'birthday'             => 'TIMESTAMP NOTNULL',
                                        'bloodGroup'           => 'VARCHAR(255)',
                                        'city'                 => 'VARCHAR(255)',
                                        'country'              => 'VARCHAR(255)',
                                        'email'                => 'VARCHAR(255)',
                                        'firstName'            => 'VARCHAR(255)',
                                        'gender'               => 'VARCHAR(255)',
                                        'id'                   => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'lastName'             => 'VARCHAR(255)',
                                        'mobilePhone'          => 'VARCHAR(255)',
                                        'nickname'             => 'VARCHAR(255)',
                                        'picture'              => 'VARCHAR(255)',
                                        'post'                 => 'VARCHAR(255)',
                                        'specialDetail'        => 'VARCHAR(255)',
                                        'state'                => 'VARCHAR(255)',
                                        'telephone'            => 'VARCHAR(255)',
                                        'spaEmployeeQueue_id'  => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spaemployee_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaemployee_column'], 'spe_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaemployee_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaMenu_SpaEmployee
    ////////////////////////////////////////////
    $pntable['spaservice_spamenu_spaemployee'] = DBUtil::getLimitedTablename('spaservice_spamenu_spaemployee');
    $pntable['spaservice_spamenu_spaemployee_column'] = array(
										'id'               => 'smse_id',                            
										'spaMenu_id'       => 'smse_spamenu_id',
										'spaEmployee_id'   => 'smse_spaemployee_id'			
    );
    $pntable['spaservice_spamenu_spaemployee_column_def'] = array(                                  
                    'id'               => 'INT(11) AUTOINCREMENT PRIMARY',     
										'spaMenu_id'       => 'INT(11) NOTNULL',
										'spaEmployee_id'   => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spamenu_spaemployee_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spamenu_spaemployee_column'], 'smse_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spamenu_spaemployee_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaServiceHistory_SpaEmployee
    ////////////////////////////////////////////
    $pntable['spaservice_spaservicehistory_spaemployee'] = DBUtil::getLimitedTablename('spaservice_spaservicehistory_spaemployee');
    $pntable['spaservice_spaservicehistory_spaemployee_column'] = array(
										'id'                   => 'shse_id',                       
										'spaServiceHistory_id' => 'shse_spaservicehistory_id',
										'spaEmployee_id'       => 'shse_spaemployee_id'			
    );
    $pntable['spaservice_spaservicehistory_spaemployee_column_def'] = array(                    
                    'id'                   => 'INT(11) AUTOINCREMENT PRIMARY', 
										'spaServiceHistory_id' => 'INT(11) NOTNULL',
										'spaEmployee_id'       => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spaservicehistory_spaemployee_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaservicehistory_spaemployee_column'], 'shse_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaservicehistory_spaemployee_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaService_SpaEmployee
    ////////////////////////////////////////////
    $pntable['spaservice_spaservice_spaemployee'] = DBUtil::getLimitedTablename('spaservice_spaservice_spaemployee');
    $pntable['spaservice_spaservice_spaemployee_column'] = array(
										'id'                   => 'ssse_id',                       
										'spaService_id'        => 'ssse_spaservice_id',
										'spaEmployee_id'       => 'ssse_spaemployee_id'			
    );
    $pntable['spaservice_spaservice_spaemployee_column_def'] = array(                    
                    'id'                   => 'INT(11) AUTOINCREMENT PRIMARY',
										'spaService_id'        => 'INT(11) NOTNULL',
										'spaEmployee_id'       => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spaservice_spaemployee_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spaservice_spaemployee_column'], 'ssse_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spaservice_spaemployee_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaMenu
    ////////////////////////////////////////////
    $pntable['spaservice_spamenu'] = DBUtil::getLimitedTablename('spaservice_spamenu');
    $pntable['spaservice_spamenu_column'] = array(
                                        'id'                => 'spm_id',
                                        'title'             => 'spm_title',
                                        'titleTranslate'    => 'spm_titleTranslate',
                                        'spaCategory_id'    => 'spm_spacategory_id'
    );
    $pntable['spaservice_spamenu_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'title'             => 'VARCHAR(255)',
                                        'titleTranslate'    => 'VARCHAR(255)',
                                        'spaCategory_id'    => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spamenu_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spamenu_column'], 'spm_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spamenu_column_def']); 
    
    
    ////////////////////////////////////////////
    //table definition SpaCategory
    ////////////////////////////////////////////
    $pntable['spaservice_spacategory'] = DBUtil::getLimitedTablename('spaservice_spacategory');
    $pntable['spaservice_spacategory_column'] = array(
                                        'id'                => 'sca_id',
                                        'title'             => 'sca_title',
                                        'titleTranslate'    => 'sca_titleTranslate'
    );
    $pntable['spaservice_spacategory_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'title'             => 'VARCHAR(255)',
                                        'titleTranslate'    => 'VARCHAR(255)'
    );
    $pntable['spaservice_spacategory_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spacategory_column'], 'sca_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spacategory_column_def']);
    
    ////////////////////////////////////////////
    //table definition SpaCategory_SpaOil
    ////////////////////////////////////////////
    $pntable['spaservice_spacategory_spaoil'] = DBUtil::getLimitedTablename('spaservice_spacategory_spaoil');
    $pntable['spaservice_spacategory_spaoil_column'] = array(
                                        'id'                => 'scso_id',
                                        'spaCategory_id'    => 'scso_spaCategory_id',
                                        'spaOil_id'         => 'scso_spaOil_id'
    );
    $pntable['spaservice_spacategory_spaoil_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'spaCategory_id'    => 'INT(11) NOTNULL',
                                        'spaOil_id'         => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spacategory_spaoil_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spacategory_spaoil_column'], 'scso_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spacategory_spaoil_column_def']); 
    
    ////////////////////////////////////////////
    //table definition SpaCategory_SpaRoom
    ////////////////////////////////////////////
    $pntable['spaservice_spacategory_sparoom'] = DBUtil::getLimitedTablename('spaservice_spacategory_sparoom');
    $pntable['spaservice_spacategory_sparoom_column'] = array(
                                        'id'                => 'scsr_id',
                                        'spaCategory_id'    => 'scsr_spaCategory_id',
                                        'spaRoom_id'        => 'scsr_spaRoom_id'
    );
    $pntable['spaservice_spacategory_sparoom_column_def'] = array(
                                        'id'                => 'INT(11) AUTOINCREMENT PRIMARY',
                                        'spaCategory_id'    => 'INT(11) NOTNULL',
                                        'spaRoom_id'        => 'INT(11) NOTNULL'
    );
    $pntable['spaservice_spacategory_sparoom_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['spaservice_spacategory_sparoom_column'], 'scsr_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['spaservice_spacategory_sparoom_column_def']); 
    
    
    return $pntable;
}

?>